/*
 * A4CANBusData.h
 *
 *  Created on: Jul 9, 2011
 *      Author: matthew
 */

#ifndef A4CANBUSDATA_H_
#define A4CANBUSDATA_H_

#include <vector>
#include <string>

#include <string.h>
#include <limits.h>
#include <stdio.h>

#include "IDDataCollection.h"
#include "A4CANDataFields.h"

int htoi(char *strHex, unsigned int *nResult);

class CA4CANBusData : public CIDDataCollection<unsigned char>{
	public:
		void AddRawData(string, float, vector<unsigned char>);
		void AddRawData(string, float, string);

		void PopulateWithDataFields(CA4CANDataFields *);
		vector<int> ConvertToDataFields(string, vector<unsigned char>);

		string GetRawDataHexString(unsigned int, unsigned int);
		string GetRawDataDecString(unsigned int, unsigned int);
		// string GetDataFieldString(unsigned int, unsigned int);

		vector<int> ConvertToDataFieldFor0x005(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x050(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x0C2(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x1A0(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x280(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x288(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x320(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x380(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x38A(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x420(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x440(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x480(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x488(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x4A0(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x4A8(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x520(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x540(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x580(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x588(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x5A0(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x5D0(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x5D2(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x5D8(vector<unsigned char>);
		vector<int> ConvertToDataFieldFor0x5E0(vector<unsigned char>);
};

#endif /* A4CANBUSDATA_H_ */
